package com.mhs.dataclassification;

import java.util.Comparator;

public class Sorter {
	public static Comparator<Temp> COMPARATOR = new Comparator<Temp>(){
		// This is where the sorting happens.
        public int compare(Temp o1, Temp o2)
        {
        	String sUtility1 = Double.toString(o1.getUtilityi());
        	String sUtility2 = Double.toString(o2.getUtilityi());
        	//ascending order
			return sUtility1.compareTo(sUtility2);
			//descending order
		    //return sUtility2.compareTo(sUtility1);
        }
    };
		    
}
